﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
namespace VisualCrypto
{
    public partial class ChildForm : Form
    {
        public ChildForm()
        {
            InitializeComponent();
            
        }
        public Bitmap image1;
        public Bitmap image2;

        public ChildForm(Bitmap bitmap1, Bitmap bitmap2, MODES mode) : this()
        {
            image1 = bitmap1;
            image2 = bitmap2;
           CreateThreads(mode);
        }
        

        public void CreateThreads(MODES mode)
        {
            Thread th = new Thread(() => { ModeType(mode); });
            th.Start();
        }

        private void ModeType(MODES mode)
        {
            switch(mode)
            {
                case MODES.MonoAlgo: Algo.MonoAlgoDec(image1, image2, this, picbox); break;

            }
        }
        
        
      





    }
}
